<?php 
include '_init_.php';

$act = isset($_REQUEST['act'])?$_REQUEST['act']:'';
switch($act)
{
	default:
		$functionName = 'costaction_'.$act;
		$functionName();
	break;
}
exit();
function costaction_set_already_photo()
{
	$orderManager = Order_Manager::getOrderManager($_REQUEST['managerID']);
if($orderManager == null)
	exit("Not exist");
if($orderManager->getStatus() != Order_Manager::$STATUS_SAVED)
	exit("Not allowed");
$orderManager->init();
$orderManager->setAlreadyPhotoFlag($_REQUEST['isset']);
$orderManager->persistOrderInfo();
echo 'ok';
}

function costaction_set_already_proof()
{
	$orderManager = Order_Manager::getOrderManager($_REQUEST['managerID']);
if($orderManager == null)
	exit("Not exist");
if($orderManager->getStatus() != Order_Manager::$STATUS_SAVED)
	exit("Not allowed");
$orderManager->init();
$orderManager->setAlreadyProofFlag($_REQUEST['isset']);
$orderManager->persistOrderInfo();
echo 'ok';
}

function costaction_set_already_pickup()
{
	$orderManager = Order_Manager::getOrderManager($_REQUEST['managerID']);
if($orderManager == null)
	exit("Not exist");
if($orderManager->getStatus() != Order_Manager::$STATUS_SAVED)
	exit("Not allowed");
$orderManager->init();
$orderManager->setAlreadyPickupFlag($_REQUEST['isset']);
$orderManager->persistOrderInfo();
echo 'ok';
}
?>